#ifndef _KC_CONNERROR_H__KC_
#define _KC_CONNERROR_H__KC_

#include <string>
#include <stdexcept>

namespace kc_sf
{
	enum CommErrorType {
		FailedInit,
		FailedConnection,
		ClosedConnection,
		FailedListen,
		FailedAccept,
		FailedRead,
		FailedWrite
	};

	struct CommError : public std::logic_error
	{
		CommError ( CommErrorType type, const std::string &msg )
		: std::logic_error( msg ),
		  Type (type)
		{
		}

		CommErrorType Type;
	};
}

#endif // _KC_CONNERROR_H__KC_
